package GUI;

import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.text.SimpleDateFormat;
import java.util.Calendar;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextField;

import ControlLayer.PersonCtr;
import ControlLayer.ProductCtr;
import ControlLayer.SalesOrderCtr;
import ControlLayer.StoreCtr;
import ModelLayer.Customer;
import ModelLayer.Employee;
import ModelLayer.Person;
import ModelLayer.Product;
import ModelLayer.Store;

public class Sale extends JFrame {

	private JFrame frame;
	private JTextField productIdText;
	private JTextField amountText;
	private JTextField priceText;
	private JTextField priceVatText;
	private JTextField customerPhoText;
	private JTextField productReturnIdText;
	private JTextField amountReturnText;
	private JTextField priceReturnText;
	private JTextField priceVatReturnText;
	private JTextField customerPhoReturnText;
	private JTextField dateReturnText;
	private JTextField overviewOfOrdersText;
	private JTextField overviewOfCustomersText;
	private JTextField searchCustomerText;
	private JPanel ordersPanel;
	private JPanel orderPanel;
	private JPanel customersPanel;
	private JPanel returnPanel;
	private ProductCtr proCtr;
	private SalesOrderCtr salCtr;
	private PersonCtr perCtr;
	private Product product;
	private JTable orderOverviewTable;
	private JTable returnOverviewTable;
	private JComboBox<String> comboBox;
	private JComboBox<String> comboBoxReturn;
	private String dateNow;
	private String customerName;
	private String customerNameReturn;
	private String totalPrice;
	private JTextField dateTextField;
	private JTextField dDateTextField;
	private JTextField dStatusTextField;
	private JTextField customerNameTextField;
	private JTextField customerNameReturnTextField;
	private JTextField storeTextField;
	private StoreCtr stoCtr;
	private double price;
	private ProductSalesTable table;
	private ProductReturnTable tableReturn;
	private JTable productTableView;
	private JTable productTableReturn;
	private JScrollPane scroll;
	private JScrollPane scrollReturn;
	private JTextField dDateReturnTextField;
	private JTextField dStatusReturnTextField;
	private JTextField storeReturnTextField;



	//Constructor
	public Sale() {
		price = 0;
		setTodaysDate();
		makeFrame();
		makePanels();
		perCtr = new PersonCtr();
		frame.setVisible(true);
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void makeFrame()
	{
		frame = new JFrame();
		frame.setResizable(false);
		frame.setBounds(100, 100, 719, 500);
		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		frame.getContentPane().setLayout(null);
	}
	
	//Creates textfields
	private void makeTextFields()
	{
		dateTextField = new JTextField(getTodaysDate());
		dateTextField.setEditable(false);
		dateTextField.setBounds(534, 72, 138, 22);
		orderPanel.add(dateTextField);
		dateTextField.setColumns(10);
		
		productIdText = new JTextField();
		productIdText.setBounds(10, 149, 210, 20);
		orderPanel.add(productIdText);
		productIdText.setColumns(10);
		
		amountText = new JTextField();
		amountText.setBounds(66, 177, 31, 20);
		orderPanel.add(amountText);
		amountText.setColumns(10);
		
		priceText = new JTextField();
		priceText.setEditable(false);
		priceText.setBounds(96, 237, 124, 20);
		orderPanel.add(priceText);
		priceText.setColumns(10);
		
		priceVatText = new JTextField();
		priceVatText.setEditable(false);
		priceVatText.setBounds(96, 266, 124, 20);
		orderPanel.add(priceVatText);
		priceVatText.setColumns(10);
		
		customerPhoText = new JTextField();
		customerPhoText.addFocusListener(new FocusAdapter() {
			public void focusLost(FocusEvent arg0) 
			{
				createOrder();	
			}});
		customerPhoText.setBounds(532, 11, 140, 20);
		orderPanel.add(customerPhoText);
		customerPhoText.setColumns(10);
				
		overviewOfOrdersText = new JTextField();
		overviewOfOrdersText.setBounds(12, 64, 575, 321);
		ordersPanel.add(overviewOfOrdersText);
		overviewOfOrdersText.setColumns(10);
		
		searchCustomerText = new JTextField();
		searchCustomerText.setBounds(109, 66, 186, 20);
		customersPanel.add(searchCustomerText);
		searchCustomerText.setColumns(10);
		
		priceVatText = new JTextField(totalPrice);
		priceVatText.setEditable(false);
		priceVatText.setBounds(96, 266, 124, 20);
		orderPanel.add(priceVatText);
		priceVatText.setColumns(10);
		
		storeTextField = new JTextField("98254311");
		storeTextField.setEditable(false);
		storeTextField.setBounds(96, 358, 124, 22);
		orderPanel.add(storeTextField);
		storeTextField.setColumns(10);
		
		dDateTextField = new JTextField(getTodaysDate());
		dDateTextField.setBounds(96, 299, 124, 22);
		orderPanel.add(dDateTextField);
		dDateTextField.setColumns(10);
		
		overviewOfCustomersText = new JTextField();
		overviewOfCustomersText.setBounds(10, 97, 572, 282);
		customersPanel.add(overviewOfCustomersText);
		overviewOfCustomersText.setColumns(10);
		
		dStatusTextField = new JTextField("In progress");
		dStatusTextField.setEditable(false);
		dStatusTextField.setBounds(96, 332, 124, 22);
		orderPanel.add(dStatusTextField);
		dStatusTextField.setColumns(10);
		
		productReturnIdText = new JTextField();
		productReturnIdText.setColumns(10);
		productReturnIdText.setBounds(10, 149, 210, 20);
		returnPanel.add(productReturnIdText);
		
		amountReturnText = new JTextField();
		amountReturnText.setColumns(10);
		amountReturnText.setBounds(66, 177, 31, 20);
		returnPanel.add(amountReturnText);
		
		priceReturnText = new JTextField();
		priceReturnText.setEditable(false);
		priceReturnText.setColumns(10);
		priceReturnText.setBounds(96, 237, 124, 20);
		returnPanel.add(priceReturnText);
		
		priceVatReturnText = new JTextField();
		priceVatReturnText.setEditable(false);
		priceVatReturnText.setColumns(10);
		priceVatReturnText.setBounds(96, 266, 124, 20);
		returnPanel.add(priceVatReturnText);
		
		
		customerPhoReturnText = new JTextField();
		customerPhoReturnText.addFocusListener(new FocusAdapter()
		{
			public void focusLost(FocusEvent arg0)
			{
				createOrderReturn();
			}
		});
		customerPhoReturnText.setBounds(532, 11, 140, 20);
		returnPanel.add(customerPhoReturnText);
		customerPhoReturnText.setColumns(10);
		
		dateReturnText = new JTextField(getTodaysDate());
		dateReturnText.setEditable(false);
		dateReturnText.setColumns(10);
		dateReturnText.setBounds(534, 72, 138, 22);
		returnPanel.add(dateReturnText);
		
		dDateReturnTextField = new JTextField(getTodaysDate());
		dDateReturnTextField.setBounds(96, 299, 124, 22);
		returnPanel.add(dDateReturnTextField);
		dDateReturnTextField.setColumns(10);
		
		dStatusReturnTextField = new JTextField("In progress");
		dStatusReturnTextField.setEditable(false);
		dStatusReturnTextField.setBounds(96, 332, 124, 22);
		returnPanel.add(dStatusReturnTextField);
		dStatusReturnTextField.setColumns(10);
		
		storeReturnTextField = new JTextField("98254311");
		storeReturnTextField.setEditable(false);
		storeReturnTextField.setBounds(96, 358, 124, 22);
		returnPanel.add(storeReturnTextField);
		storeReturnTextField.setColumns(10);
		
	}
	
	//Method used to create a order
	private void createOrder()
	{
		String phoneNumber = customerPhoText.getText();
		
		if(phoneNumber.length() == 8)
		{
			perCtr = new PersonCtr();
			salCtr = new SalesOrderCtr();
			proCtr = new ProductCtr();
		    stoCtr = new StoreCtr();
			int phoneNr = Integer.parseInt(phoneNumber);
			Person person = perCtr.findCustomer(phoneNr);
			
			customerName = person.getName();			
			
			customerNameTextField = new JTextField(customerName);
			customerNameTextField.setEditable(false);
			customerNameTextField.setBounds(534, 39, 138, 22);
			orderPanel.add(customerNameTextField);
			customerNameTextField.setColumns(10);
			
			Employee emp = new Employee ("per", "wefeiu", 9000, "aalborg", 81850338, "test", "admin");
			
			String date = getTodaysDate();
			String orderType = comboBox.getSelectedItem().toString();
			String deliveryStatus = dStatusTextField.getText();
			String deliveryDate = dDateTextField.getText();	
			int customerId = Integer.parseInt(customerPhoText.getText());
			Customer cus = perCtr.findCustomer(customerId);
			salCtr.insertSalesOrder(date, orderType, deliveryStatus, deliveryDate, cus, emp);	
			
		}
	}
	
	//Method used to create a return order
	private void createOrderReturn()
	{
		String phoneNumber = customerPhoReturnText.getText();
		
		if(phoneNumber.length() == 8)
		{
			perCtr = new PersonCtr();
			salCtr = new SalesOrderCtr();
			proCtr = new ProductCtr();
		    stoCtr = new StoreCtr();
			int phoneNr = Integer.parseInt(phoneNumber);
			Person person = perCtr.findCustomer(phoneNr);
			
			customerNameReturn = person.getName();			
			
			customerNameReturnTextField = new JTextField(customerNameReturn);
			customerNameReturnTextField.setEditable(false);
			customerNameReturnTextField.setBounds(534, 39, 138, 22);
			returnPanel.add(customerNameReturnTextField);
			customerNameReturnTextField.setColumns(10);
			
			Employee emp = new Employee ("per", "wefeiu", 9000, "aalborg", 31197437, "test", "admin");
			
			String date = getTodaysDate();
			String orderType = comboBoxReturn.getSelectedItem().toString();
			String deliveryStatus = dStatusReturnTextField.getText();
			String deliveryDate = dDateReturnTextField.getText();	
			int customerId = Integer.parseInt(customerPhoReturnText.getText());
			Customer cus = perCtr.findCustomer(customerId);
			salCtr.insertSalesOrder(date, orderType, deliveryStatus, deliveryDate, cus, emp);	
			
		}
	}
	
	//Creates labels
	private void makeTables()
	{
		
		productTableView = new JTable();
		productTableView.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
		scroll.setViewportView(productTableView);
		table = new ProductSalesTable();
		productTableView.setModel(table);
		
		productTableReturn = new JTable();
		productTableReturn.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
		scrollReturn.setViewportView(productTableReturn);
		tableReturn = new ProductReturnTable();
		productTableReturn.setModel(tableReturn);
	}
	
	//Method used when searching for a product
	public void searchMethod()
	{
		proCtr = new ProductCtr();
		String pro = productIdText.getText();
		if(pro.isEmpty()){

		}
		else
		{
			int proId = Integer.parseInt(productIdText.getText());
			Product insertedProduct = proCtr.findProduct(proId, false);
			if (insertedProduct != null)
			{
				table.addProduct(insertedProduct);
				table.setAmount(amountText.getText());
				frame.setVisible(true);
			}
		}
	}
	
	//Method used when searching for a product used for return order
	public void searchReturnMethod()
	{
		proCtr = new ProductCtr();
		String pro = productReturnIdText.getText();
		if(pro.isEmpty()){

		}
		else
		{
			int proId = Integer.parseInt(productReturnIdText.getText());
			Product insertedProduct = proCtr.findProduct(proId, false);
			if (insertedProduct != null)
			{
				tableReturn.addProduct(insertedProduct);
				tableReturn.setAmount(amountReturnText.getText());
				frame.setVisible(true);
			}
		}
	}
	
	//Creates combobox
	private void makeComboBox()
	{
		comboBox = new JComboBox();
		comboBox.setModel(new DefaultComboBoxModel(new String[] {"Private", "Business"}));
		comboBox.setBounds(532, 104, 140, 20);
		orderPanel.add(comboBox);
				
		comboBoxReturn = new JComboBox();
		comboBoxReturn.setModel(new DefaultComboBoxModel(new String[] {"Private", "Business"}));
		comboBoxReturn.setBounds(532, 105, 140, 20);
		returnPanel.add(comboBoxReturn);
		
	}
	
	//Creates buttons
	private void makeButtons()
	{
		JButton buttonCancel = new JButton("Cancel Order");
		buttonCancel.setBounds(144, 393, 124, 23);
		orderPanel.add(buttonCancel);
		
		JButton AddButton = new JButton("add to order");
		AddButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				
				addSalesOrderLine();
				searchMethod();
			}
		});
		AddButton.setBounds(109, 175, 111, 25);
		orderPanel.add(AddButton);
		
		JButton buttonConfirm = new JButton("Confirm Order");
		buttonConfirm.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				
				salCtr.confirmOrder();
				clearAllTextFields();
			}
		});
		buttonConfirm.setBounds(548, 393, 124, 23);
		orderPanel.add(buttonConfirm);
		
		JButton buttonInfoCustomer = new JButton("Info");
		buttonInfoCustomer.setBounds(548, 393, 124, 23);
		customersPanel.add(buttonInfoCustomer);
		
		JButton buttonReturn = new JButton("Return");
		buttonReturn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				frame.dispose();
			}
		});
		buttonReturn.setBounds(10, 393, 124, 23);
		orderPanel.add(buttonReturn);
		
		JButton buttonReturnReturn = new JButton("Return");
		buttonReturnReturn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				frame.dispose();
			}
		});
		buttonReturnReturn.setBounds(10, 393, 124, 23);
		returnPanel.add(buttonReturnReturn);

		JButton buttonOrdersReturn = new JButton("Return");
		buttonOrdersReturn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				frame.dispose();
			}
		});
		buttonOrdersReturn.setBounds(10, 393, 124, 23);
		ordersPanel.add(buttonOrdersReturn);
		
		JButton buttonInfo = new JButton("Info");
		buttonInfo.setBounds(548, 393, 124, 23);
		ordersPanel.add(buttonInfo);
		
		JButton buttonCancelReturn = new JButton("Cancel Order");
		buttonCancelReturn.setBounds(144, 393, 124, 23);
		returnPanel.add(buttonCancelReturn);
		
		JButton buttonConfirmReturn = new JButton("Confirm Order");
		buttonConfirmReturn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				
				salCtr.confirmOrder();
				clearAllReturnTextFields();
			}
		});
		buttonConfirmReturn.setBounds(548, 393, 124, 23);
		returnPanel.add(buttonConfirmReturn);
		
		JButton buttonSearch = new JButton("Search");
		buttonSearch.setBounds(10, 66, 89, 23);
		customersPanel.add(buttonSearch);
		
		JButton btnNewButton = new JButton("Return");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				frame.dispose();
			}
		});
		btnNewButton.setBounds(10, 393, 124, 23);
		customersPanel.add(btnNewButton);
		
		JButton addReturnButton = new JButton("add to order");
		addReturnButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				
				addSalesOrderLineReturn();
				searchReturnMethod();
			}
		});
		addReturnButton.setBounds(109, 175, 111, 25);
		returnPanel.add(addReturnButton);
	}
	
	//Clears all text fields
	private void clearAllTextFields()
	{
		customerPhoText.setText("");
		priceVatText.setText("");
		customerNameTextField.setText("");
		priceText.setText("");
		productIdText.setText("");
		amountText.setText("");	
	}
	
	//Clears all return fields
	private void clearAllReturnTextFields()
	{
		customerPhoReturnText.setText("");
		priceVatReturnText.setText("");
		customerNameReturnTextField.setText("");
		priceReturnText.setText("");
		productReturnIdText.setText("");
		amountReturnText.setText("");	
	}
	
	//Sets today's date
	private void setTodaysDate()
	{
		Calendar currentDate = Calendar.getInstance();
		  SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MMM-dd");
		  dateNow = formatter.format(currentDate.getTime());
		 
		  
    }
	
	//Returns today's date
	private String getTodaysDate()
	{
		return dateNow;
	}
	
	//Adds a SOL
	private void addSalesOrderLine()
	{	
		
		Store store = stoCtr.findStore(Integer.parseInt(storeTextField.getText()));
		if(store == null)
		{
			System.out.println("storelalala");
			store = new Store();
			store.setPhoneNumber(Integer.parseInt(storeTextField.getText()));
		}
		
		int amount = Integer.parseInt(amountText.getText());
		int productNumber = Integer.parseInt(productIdText.getText());
		product = proCtr.findProduct(productNumber, false);
		
		String salesPrice = product.getSalesPrice().toString();
		priceText.setText(salesPrice);
		
		salCtr.insertSalesOrderLine(amount, product, store);
		
		
		if(product != null)
		{
		price += product.getSalesPrice() * amount;
		priceVatText.setText(Double.toString(price));
		}
		else
		{
			priceVatText.setText("product not found");
		}
	}
		
	//Adds a SOL for return	
	private void addSalesOrderLineReturn()
		{	
			
			Store store = stoCtr.findStore(Integer.parseInt(storeReturnTextField.getText()));
			if(store == null)
			{
				System.out.println("storeReturn");
				store = new Store();
				store.setPhoneNumber(Integer.parseInt(storeReturnTextField.getText()));
			}
			
			int amount = Integer.parseInt(amountReturnText.getText());
			int productNumber = Integer.parseInt(productReturnIdText.getText());
			product = proCtr.findProduct(productNumber, false);
			
			String salesPrice = product.getSalesPrice().toString();
			priceReturnText.setText(salesPrice);
			
			salCtr.insertSalesOrderLine(amount, product, store);
			
			
			if(product != null)
			{
			price += product.getSalesPrice() * amount;
			priceVatReturnText.setText(("-")+(Double.toString(price)));
			}
			else
			{
				priceVatReturnText.setText("product not found");
			}
	}
		
	//Create panels
	private void makePanels()
	{
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(0, 0, 701, 455);
		frame.getContentPane().add(tabbedPane);
		
		customersPanel = new JPanel();
		tabbedPane.addTab("Customers", null, customersPanel, null);
		customersPanel.setLayout(null);
		
		ordersPanel = new JPanel();
		tabbedPane.addTab("Orders", null, ordersPanel, null);
		ordersPanel.setLayout(null);
		
		returnPanel = new JPanel();
		tabbedPane.addTab("Return Order", null, returnPanel, null);
		returnPanel.setLayout(null);
		
		orderPanel = new JPanel();
		tabbedPane.addTab("New Order", null, orderPanel, null);
		orderPanel.setLayout(null);
		
		scroll = new JScrollPane();
		scroll.setBounds(272, 155, 376, 225);
		orderPanel.add(scroll);
		
		scrollReturn = new JScrollPane();
		scrollReturn.setBounds(272, 155, 376, 225);
		returnPanel.add(scrollReturn);
				
		makeLabels();
		makeButtons();
		makeTextFields();
		makeTables();
		makeComboBox();
		
	}
	
	//Create labels
	private void makeLabels()
	{
		JLabel lblOverviewOfCustomers = new JLabel("Overview of customers");
		lblOverviewOfCustomers.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblOverviewOfCustomers.setBounds(10, 41, 162, 14);
		customersPanel.add(lblOverviewOfCustomers);
		
		JLabel lblOverviewOfOrders = new JLabel("Overview of orders");
		lblOverviewOfOrders.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblOverviewOfOrders.setBounds(10, 39, 145, 14);
		ordersPanel.add(lblOverviewOfOrders);
		
		JLabel lblOverviewOfProductsReturn = new JLabel("Overview of products");
		lblOverviewOfProductsReturn.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblOverviewOfProductsReturn.setBounds(272, 124, 159, 20);
		returnPanel.add(lblOverviewOfProductsReturn);
		
		JLabel lblDateReturn = new JLabel("Date");
		lblDateReturn.setBounds(499, 76, 23, 14);
		returnPanel.add(lblDateReturn);
		
		JLabel storeLable = new JLabel("Store");
		storeLable.setBounds(10, 357, 56, 16);
		orderPanel.add(storeLable);
		
		JLabel lblCustomerNameReturn = new JLabel("Customer Name");
		lblCustomerNameReturn.setBounds(446, 39, 76, 16);
		returnPanel.add(lblCustomerNameReturn);
		
		JLabel lblNewLabel = new JLabel("Delivery status");
		lblNewLabel.setBounds(10, 332, 87, 16);
		orderPanel.add(lblNewLabel);
		
		JLabel lblCustomerReturn = new JLabel("Customer");
		lblCustomerReturn.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblCustomerReturn.setBounds(466, 14, 56, 14);
		returnPanel.add(lblCustomerReturn);
		
		JLabel lblSummaryReturn = new JLabel("Summary");
		lblSummaryReturn.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblSummaryReturn.setBounds(10, 210, 63, 14);
		returnPanel.add(lblSummaryReturn);
		
		JLabel lblPriceReturn = new JLabel("Price");
		lblPriceReturn.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblPriceReturn.setBounds(10, 240, 46, 14);
		returnPanel.add(lblPriceReturn);
		
		JLabel lblPriceVatReturn = new JLabel("Price + vat");
		lblPriceVatReturn.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblPriceVatReturn.setBounds(10, 269, 63, 14);
		returnPanel.add(lblPriceVatReturn);
		
		JLabel lblCustomer = new JLabel("Customer");
		lblCustomer.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblCustomer.setBounds(466, 14, 56, 14);
		orderPanel.add(lblCustomer);
		
		JLabel lblDate = new JLabel("Date");
		lblDate.setBounds(499, 76, 23, 14);
		orderPanel.add(lblDate);
		
		JLabel lblProductReturnId = new JLabel("Product ID");
		lblProductReturnId.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblProductReturnId.setBounds(10, 124, 93, 14);
		returnPanel.add(lblProductReturnId);
		
		JLabel lblProductId = new JLabel("Product ID");
		lblProductId.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblProductId.setBounds(10, 124, 93, 14);
		orderPanel.add(lblProductId);
		
		
		JLabel dDateLabel = new JLabel("Delivery date");
		dDateLabel.setBounds(10, 303, 87, 16);
		orderPanel.add(dDateLabel);
		
		JLabel lblAmount = new JLabel("Amount");
		lblAmount.setBounds(10, 180, 46, 14);
		orderPanel.add(lblAmount);
		
		JLabel lblOrderType = new JLabel("Order Type");
		lblOrderType.setBounds(466, 107, 56, 14);
		orderPanel.add(lblOrderType);
		
		JLabel lblSummary = new JLabel("Summary");
		lblSummary.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblSummary.setBounds(10, 210, 63, 14);
		orderPanel.add(lblSummary);
		
		JLabel lblPrice = new JLabel("Price");
		lblPrice.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblPrice.setBounds(10, 240, 46, 14);
		orderPanel.add(lblPrice);
		
		JLabel CustomerNameLabel_ = new JLabel("Customer Name");
		CustomerNameLabel_.setBounds(446, 39, 76, 16);
		orderPanel.add(CustomerNameLabel_);
		
		JLabel lblPriceVat = new JLabel("Price + vat");
		lblPriceVat.setFont(new Font("Tahoma", Font.PLAIN, 13));
		lblPriceVat.setBounds(10, 269, 63, 14);
		orderPanel.add(lblPriceVat);
		
		JLabel lblOverviewOfProducts = new JLabel("Overview of products");
		lblOverviewOfProducts.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblOverviewOfProducts.setBounds(272, 124, 159, 20);
		orderPanel.add(lblOverviewOfProducts);
		
		JLabel lblAmountReturn = new JLabel("Amount");
		lblAmountReturn.setBounds(10, 180, 46, 14);
		returnPanel.add(lblAmountReturn);
		
		JLabel lblOrderType_1 = new JLabel("Order Type");
		lblOrderType_1.setBounds(466, 107, 56, 14);
		returnPanel.add(lblOrderType_1);
		
		JLabel lblDeliveryDateReturn = new JLabel("Delivery date");
		lblDeliveryDateReturn.setBounds(10, 303, 87, 16);
		returnPanel.add(lblDeliveryDateReturn);
		
		JLabel lblDeliverStatusReturn = new JLabel("Delivery status");
		lblDeliverStatusReturn.setBounds(10, 332, 76, 16);
		returnPanel.add(lblDeliverStatusReturn);
		
		JLabel lblStoreReturn = new JLabel("Store");
		lblStoreReturn.setBounds(10, 357, 56, 16);
		returnPanel.add(lblStoreReturn);
		
		
	}
}
